package com.common.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("auth-service")
public interface AuthClient {
    /**
     * openFeign根据用户名获取用户id
     */
    @GetMapping("/aopGetByUsername")
    Long getByUsername(@RequestParam("username") String username);
    /**
     * openFeign根据用户id获取用户名
     */
    @GetMapping("/aopGetByUserId")
    String getByUserId(@RequestParam("userId") Long userId);
}
